import Vue from 'vue'
import Router from 'vue-router'
const index = () =>
	import('@/components/Index')
const Bookkeeping = () =>
	import('@/components/Bookkeeping')
const HistoricalNews = () =>
	import('@/components/HistoricalNews')
const login = () =>
	import('@/components/Login')
const PersonalCenter = () =>
	import('@/components/PersonalCenter')
	const error404 = () =>
		import('@/components/Error404')
Vue.use(Router)

export default new Router({
	mode: 'history',
	routes: [{
			path: '/',
			component: index,
			children: [{
					path: '/',
					name: 'Bookkeeping',
					component: Bookkeeping
				},
				{
					path: '/HistoricalNews',
					name: 'HistoricalNews',
					component: HistoricalNews
				},
				{
					path: '/PersonalCenter',
					name: 'PersonalCenter',
					component: PersonalCenter
				}
			]
		},
		{
			path: '/login',
			name: 'login',
			component: login
		},
		{
			path: '*',
			name: 'error404',
			component: error404
		}

	]
})
